Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep in store locale, country and currency #151

Merged
merged 5 commits into from
Sep 4, 2019

Conversation

lauraluiz
Copy link
Contributor

@lauraluiz lauraluiz commented Aug 28, 2019

  • Added library vuex-persistedstate to keep in local storage the authentication, as well as country/language/currency.
  • To achieve that, everything has been moved to Vuex, instead of storing and reading it manually.
  • Cart is created with country and shipping address with this country.

Copy link
Contributor

@zeina-idris zeina-idris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really good, lots of improvements 😄

@zeina-idris
Copy link
Contributor

I guess this fixes issue #147 ?

@lauraluiz
Copy link
Contributor Author

@zeina-idris @plaskevich I have fixed the tests, please check the change as they are not trivial.
Due to the fact that now country/currency is selected and added to the cart, the prices shown are applying taxes, which is more correct (before they weren't).
Also, I've made sure the location selector closes the moment you select a language.

@lauraluiz
Copy link
Contributor Author

I guess this fixes issue #147 ?

Not completely. This PR only allows to configure country/currency/languages. What the issue mentions is that we should fetch this information from the API, and fallback to the configured ones when it's not available. So let's say this PR does 25% of the issue :P

@lauraluiz lauraluiz merged commit ecaa244 into development Sep 4, 2019
@lauraluiz lauraluiz deleted the save-store-local-storage branch September 4, 2019 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants